package com.atguigu.shrio.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.shrio.domain.Account;
import com.atguigu.shrio.service.AccountService;
import com.atguigu.shrio.mapper.AccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account>
    implements AccountService{
    @Autowired
    private AccountMapper accountMapper;
    @Override
    public Account findByUsername(String username) {

        QueryWrapper<Account> accountQueryWrapper = new QueryWrapper<>();
        accountQueryWrapper.eq("username",username);

        return accountMapper.selectOne(accountQueryWrapper);
    }
}




